package org.jeecg.modules.wms.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.wms.entity.WmsRequisitionAccessory;
import org.jeecg.modules.wms.mapper.WmsRequisitionAccessoryMapper;
import org.jeecg.modules.wms.service.IWmsRequisitionAccessoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 领料单配件服务实现类
 */
@Service
public class WmsRequisitionAccessoryServiceImpl extends ServiceImpl<WmsRequisitionAccessoryMapper, WmsRequisitionAccessory> implements IWmsRequisitionAccessoryService {

    @Autowired
    private WmsRequisitionAccessoryMapper wmsRequisitionAccessoryMapper;

    @Override
    public List<WmsRequisitionAccessory> getAccessoryList(String requisitionId) {
        LambdaQueryWrapper<WmsRequisitionAccessory> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(WmsRequisitionAccessory::getRequisitionId, requisitionId);
        queryWrapper.orderByAsc(WmsRequisitionAccessory::getCreateTime);
        return this.list(queryWrapper);
    }
} 